import axios from "../request";
export function login(data) {
  return axios({
    method: "post",
    url: "/api/login",
    params: {
      a: "啊哈哈",
    },
    data,
  });
}
export function getCity(src) {
  return axios({
    method: "get",
    url:src,
  });
}
export function getMockTable(data) {
  return axios({
    method: "post",
    url:"/web/table",
    data
  });
}
export function getOrganization() {
  return new Promise((resolve, reject) => {
    let arr = [
      {
        name: "深圳一中",
        id: 0,
      },
      {
        name: "深圳一中",
        id: 1,
      },
      {
        name: "深圳一中",
        id: 2,
      },
      {
        name: "深圳一中",
        id: 3,
      },
    ];
    setTimeout(() => {
      resolve(arr);
    }, 3000);
  });
}
export function getTableData() {
  return new Promise((resolve, reject) => {
    let arr = [
      { date: "2023-11-21", name: "胡炳华1", address: "火星1", sex: "男" },
      { date: "2023-11-22", name: "胡炳华2", address: "火星2", sex: "男" },
      { date: "2023-11-23", name: "胡炳华3", address: "火星3", sex: "男" },
      { date: "2023-11-24", name: "胡炳华4", address: "火星4", sex: "男" },
      { date: "2023-11-25", name: "胡炳华5", address: "火星5", sex: "男" },
      { date: "2023-11-26", name: "胡炳华6", address: "火星6", sex: "男" },
      { date: "2023-11-27", name: "胡炳华7", address: "火星7", sex: "男" },
      { date: "2023-11-28", name: "胡炳华8", address: "火星8", sex: "男" },
      { date: "2023-11-29", name: "胡炳华9", address: "火星9", sex: "男" },
    ];
    setTimeout(() => {
      resolve(arr);
    }, 3000);
  });
}
